using CSharp.Basic.Learn.作业调度;
using CSharp.Basic.Learn.作业调度.作业持久化;
using CSharp.Basic.Learn.并发多线程;
using System;
using System.Threading.Tasks;

namespace CSharp.Basic.Learn
{
  public class Program
  {
    public static void Main()
    {
      ParallelTest test = new ParallelTest();
      var penumerable = new PEnumerable();

      //test.ParallelInvokeMethod();

      //Parallel For 测试

      //test.ParallelForMethod1();
      //同步运行无序
      //Parallel.For(1, 100, item =>
      //{
      //  Console.WriteLine("item:" + item);
      //});

      //Parallel中途退出循环和异常处理

      //test.ParallelBreak();
      //test.ParallelStop();


      //penumerable.ListWithParallel();
      //penumerable.ConcurrentBagWithPallel();

      //同步 Linq

      //PLinqTest.TestPLinq();
      //PLinqTest.OrderByTest();
      //JobScheduleTest.RunAsync().GetAwaiter().GetResult();
      //JobSchedulerWithMysql.RunAsync().GetAwaiter().GetResult();

      //中介者模式 MediatR


    }
  }
}
